package com.yuntsg.ruiijn.paperana.test;

import cn.hutool.core.util.ZipUtil;
import cn.hutool.db.Db;
import cn.hutool.db.Entity;
import cn.hutool.db.ds.DSFactory;
import lombok.SneakyThrows;

import java.util.List;

public class DemoTxt {
    @SneakyThrows
    public static void main(String[] args) {


        Db use = Db.use(DSFactory.get("server_taiyidata"));
        String table = "ncbi_pdf_to_txt_685";
        List<Entity> query = use.query("select * from " + table + " where pmid_ut = ?", 37227868);
        for (Entity entity : query) {
            String content = ZipUtil.unGzip(entity.getBytes("content"), "utf-8");
            String optimal_content = ZipUtil.unGzip(entity.getBytes("optimal_content"), "utf-8");
            System.out.println(content);
            System.out.println(optimal_content);

        }
    }
}
